AppCompatTextView
open class AppCompatTextView : TextView, TintableBackgroundView, TintableCompoundDrawablesView, AutoSizeableTextView, EmojiCompatConfigurationView(source)
(SESL variant) A TextView which supports compatible features on older versions of the platform, including:
- Allows dynamic tint of its background via the background tint methods in androidx.core.view.ViewCompat.
- Allows setting of the background tint using backgroundTint and backgroundTintMode.
- Supports auto-sizing via androidx.core.widget.TextViewCompat by allowing to instruct a TextView to let the size of the text expand or contract automatically to fill its layout based on the TextView's characteristics and boundaries. The style attributes associated with auto-sizing are autoSizeTextType, autoSizeMinTextSize, autoSizeMaxTextSize, autoSizeStepGranularity and autoSizePresetSizes, all of which work back to Ice Cream Sandwich.
This will automatically be used when you use TextView in your layouts and the top-level activity / dialog is provided by appcompat. You should only need to manually use this class when writing custom views.
Inheritors
Constructors
Link copied to clipboard
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet, defStyleAttr: Int)
Functions
Link copied to clipboard
This should be accessed via getAutoSizeMaxTextSize
Link copied to clipboard
This should be accessed via getAutoSizeMinTextSize
Link copied to clipboard
This should be accessed via getAutoSizeStepGranularity
Link copied to clipboard
This should be accessed via getAutoSizeTextAvailableSizes
Link copied to clipboard
This should be accessed via getAutoSizeTextType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
This should be accessed via getBackgroundTintList
Link copied to clipboard
This should be accessed via getBackgroundTintMode
Link copied to clipboard
This should be accessed via getCompoundDrawableTintList
Link copied to clipboard
This should be accessed via getCompoundDrawableTintMode Returns the blending mode used to apply the tint to the compound drawables, if specified.
Link copied to clipboard
Link copied to clipboard
Returns the TextClassifier used by this TextView.
Link copied to clipboard
Gets the parameters for text layout precomputation, for use with PrecomputedTextCompat.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setAutoSizeTextTypeUniformWithConfiguration(autoSizeMinTextSize: Int, autoSizeMaxTextSize: Int, autoSizeStepGranularity: Int, unit: Int)
This should be accessed via setAutoSizeTextTypeUniformWithConfiguration
Link copied to clipboard
This should be accessed via setAutoSizeTextTypeUniformWithPresetSizes
Link copied to clipboard
This should be accessed via setAutoSizeTextTypeWithDefaults
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setCompoundDrawables(@Nullable left: @Nullable Drawable, @Nullable top: @Nullable Drawable, @Nullable right: @Nullable Drawable, @Nullable bottom: @Nullable Drawable)
Link copied to clipboard
open fun setCompoundDrawablesRelative(@Nullable start: @Nullable Drawable, @Nullable top: @Nullable Drawable, @Nullable end: @Nullable Drawable, @Nullable bottom: @Nullable Drawable)
Link copied to clipboard
open fun setCompoundDrawablesRelativeWithIntrinsicBounds(@Nullable start: @Nullable Drawable, @Nullable top: @Nullable Drawable, @Nullable end: @Nullable Drawable, @Nullable bottom: @Nullable Drawable)
open fun setCompoundDrawablesRelativeWithIntrinsicBounds(start: Int, top: Int, end: Int, bottom: Int)
Link copied to clipboard
open fun setCompoundDrawablesWithIntrinsicBounds(@Nullable left: @Nullable Drawable, @Nullable top: @Nullable Drawable, @Nullable right: @Nullable Drawable, @Nullable bottom: @Nullable Drawable)
Link copied to clipboard
Link copied to clipboard
Configure emoji fallback behavior using EmojiCompat.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Set font variation settings.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Sets the PrecomputedTextCompat to the TextView.
Link copied to clipboard
This should be accessed via setBackgroundTintList
Link copied to clipboard
This should be accessed via setBackgroundTintMode
Link copied to clipboard
This should be accessed via setCompoundDrawableTintList Applies a tint to the compound drawables.
Link copied to clipboard
This should be accessed via setCompoundDrawableTintMode Specifies the blending mode used to apply the tint specified by setSupportCompoundDrawablesTintList to the compound drawables.
Link copied to clipboard
Link copied to clipboard
Sets the TextClassifier for this TextView.
Link copied to clipboard
Set the precomputed text future.
Link copied to clipboard
Apply the text layout parameter.
Link copied to clipboard
Link copied to clipboard